package com.cby.operation.common.widget.floatview

import java.lang.ref.WeakReference

/**
 * author : Android 轮子哥
 * github : https://github.com/getActivity/XToast
 * time   : 2019/01/04
 * desc   : Toast 定时销毁任务
 */
internal class DismissRunnable(toast: HykbFloatView?) : WeakReference<HykbFloatView?>(toast),
    Runnable {
    override fun run() {
        val view = get()
        if (view != null && view.isShow) {
            view.cancel()
        }
    }
}